<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
      
<ui:composition template="/restrito/template.xhtml">

<ui:define name="menu"><ui:include src="menu.xhtml"/></ui:define>

<ui:define name="corpo">
	<h:outputScript library="js" name="jquery.maskedinput-1.2.2.js" target="head" />

    <div class="container">
    <ui:include src="../mensagem.xhtml"/>
	    <h:form id="f" styleClass="form-horizontal">
	    	<fieldset>
	    	<legend>Dados de acesso</legend>
	        <div class="control-group">
	  			<h:outputLabel for="senhaAtual" value="* Senha atual" styleClass="control-label"/>
	  			<div class="controls">
					<h:inputSecret id="senhaAtual" value="#{alterarSenhaEmpresaMB.senhaAtual}" required="true" maxlength="20" styleClass="input-xlarge"/>
					<rich:message for="senhaAtual" />
	  			</div>
			</div>
	        <div class="control-group">
	  			<h:outputLabel for="senhaNova" value="* Nova senha" styleClass="control-label"/>
	  			<div class="controls">
	  				<h:inputSecret id="senhaNova" value="#{alterarSenhaEmpresaMB.senhaNova}" binding="#{senhaNova}" required="true" maxlength="20" styleClass="input-xlarge">
	  					<f:validateLength minimum="6" />
	  				</h:inputSecret>
					<rich:message for="senhaNova" />
	  			</div>
			</div>
	        <div class="control-group">
	  			<h:outputLabel for="senhaNovaConfirmacao" value="* Confirme sua nova senha" styleClass="control-label"/>
	  			<div class="controls">
	  				<h:inputSecret id="senhaNovaConfirmacao" value="#{alterarSenhaEmpresaMB.senhaNovaConfirmacao}" required="true" maxlength="20" styleClass="input-xlarge">
	  					<f:validateLength minimum="6" />
	  					<f:validator validatorId="validadorConfirmacaoSenha"/>
	  					<f:attribute name="senha" value="#{senhaNova}"/>
	  				</h:inputSecret>
					<rich:message for="senhaNovaConfirmacao" />
	  			</div>
			</div>
			</fieldset>
			<div class="form-actions">
				<h:commandButton action="#{alterarSenhaEmpresaMB.alterar}" value="Alterar Senha" styleClass="btn-large btn-primary"/>
			</div>
		</h:form>
	</div>
</ui:define>
</ui:composition>
</html>
